//
//  UIStackView+Ext.swift
//  ESVpn
//
//  Created by nkl on 2023/6/28.
//

import Foundation
import UIKit

extension UIStackView {
    
    public static func hStack(space: CGFloat = 0) -> UIStackView {
        let stack = UIStackView.hStack
        stack.spacing = space
        return stack
    }

    public static func vStack(space: CGFloat = 0) -> UIStackView {
        let stack = UIStackView.vStack
        stack.spacing = space
        return stack
    }

    public static var hStack: UIStackView {
        let stack = UIStackView()
        stack.axis = .horizontal
        return stack
    }

    public static var vStack: UIStackView {
        let stack = UIStackView()
        stack.axis = .vertical
        return stack
    }
}
